import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/tykj";

// 设置默认
export function updateIsDefault(id) {
  return request({
    url: '/basic/account/updateIsDefault/' + id,
    method: 'get',
  })
}

// 查询收支项目列表
export function listAccount(query) {
  return request({
    url: '/basic/account/list',
    method: 'get',
    params: query
  })
}

// 新增收支项目列表
export function addAccount(data) {
  return request({
    url: '/basic/account/save',
    method: 'post',
    data: data
  })
}

// 查询收支项目详细
export function getAccount(id) {
  return request({
    url: '/basic/account/info/' + praseStrEmpty(id),
    method: 'get'
  })
}

// 修改收支项目
export function updateAccount(data) {
  return request({
    url: '/basic/account/update',
    method: 'put',
    data: data
  })
}

// 删除收支项目
export function delAccount(userId) {
  return request({
    url: '/basic/account/delete/' + userId,
    method: 'delete'
  })
}






